import React, { memo, useEffect } from "react"
import { useDispatch } from "react-redux"

import { changeHeaderConfigAction } from "@/store/modules/main"
import EntireFilter from "./entire-filter"
import EntirePage from "./entire-pagenation"
import EntireRooms from "./entire-rooms"
import { EntireWrapper } from "./style"

// 更多
const Entire = memo(() => {
  const dispatch = useDispatch()
  useEffect(() => {
    dispatch(changeHeaderConfigAction({ isFixed: true, topAlpha: false }))
  }, [dispatch])
  return (
    <EntireWrapper>
      <EntireFilter />
      <EntireRooms />
      <EntirePage />
    </EntireWrapper>
  )
})

export default Entire
